<%@page import="edu.sdibt.bean.Student"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
     Object msg=request.getAttribute("massage");
     if(msg!=null){
     %>
     <br>
     <p style="color: red"><%=msg %></p>
     <br>
     <%
     }
  Student student=(Student)request.getAttribute("oldstu");
     %>


     <form action="update.do" method="get">
     <input type="hidden" name="oldName" value="<%=student.getName()%>">
     <input type="hidden" name="id" value="<%=student.getId()%>">
     <table>
          <tr>
              <td>ID:</td>
              <td><%=student.getId()%></td>
          </tr> 
          <tr>
              <td>Name:</td>
              <td><input type="text" name="name" value="<%=student.getName()%>"></td>
          </tr> 
          <tr>
              <td>Password:</td>
              <td><input type="text" name="password" value="<%=student.getPassword()%>"></td>
          </tr>
           <tr>
              <td><input type="submit" value="update"></td>
              <td><a href="select.do">return<a></a></td>
          </tr>
     </table>
     </form>
</body>
</html>